home *** CD-ROM | disk | FTP | other *** search
- #! /bin/sh
- #
- # buildversion
- #
- # Script originally by Mike Ferris
- # Modified with permission for use in the MiscKit by Don Yacktman
- # Copyright (C) 1994 Don Yacktman
-
- if [ ! $# -eq 7 ] ; then
- echo "usage: buildversion filename proj_name proj_vers proj_rel file_name file_vers cflags"
- echo " filename is the version file to create."
- echo " proj_name is the name of the project."
- echo " proj_vers is the version of the project."
- echo " proj_rel is the release number of the project."
- echo " file_name is the file's name."
- echo " file_vers is the version number of the file."
- echo " cflags are the CFLAGS used to build the versioned file."
- exit 1
- fi
-
- PROJECT="$2 $3.$4 (lib$5.a)"
- DATE=`date`
- USER=`whoami`
-
- rm -f $1
- cat > $1 <<EOF!
- static const char VersionString[] =
- "$PROJECT: Version $6. Built by $USER, $DATE. CFLAGS: $7";
-
- const char *$2_$5Version()
- {
- return VersionString;
- }
-
- EOF!
-